﻿@using AdverseEventReportSystem.BLL.ServiceReference1;
@{
    var department = ViewBag.Department as tb_Department;
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title></title>
    <link href="~/lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
    <link href="~/lib/ligerUI/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
    <link href="~/lib/ligerUI/skins/Gray/css/all.css" rel="stylesheet" type="text/css" />
    <link href="~/Content/css/common.css" rel="stylesheet" type="text/css" />
    <script src="~/lib/jquery/jquery-1.9.0.min.js" type="text/javascript"></script>
    <script src="~/lib/ligerUI/js/ligerui.all.js"></script>
    <script src="~/Scripts/common.js"></script>
    <style>
        .iconlist {
            width: 360px;
            padding: 3px;
        }

            .iconlist li {
                border: 1px solid #FFFFFF;
                float: left;
                display: block;
                padding: 2px;
                cursor: pointer;
            }

                .iconlist li.over {
                    border: 1px solid #516B9F;
                }

                .iconlist li img {
                    height: 16px;
                    height: 16px;
                }
    </style>
</head>
<body>
    <div style="margin:10px 0px;">
        <table class="gridtable">
            <tr>
                <td style="text-align:right; width:100px;">
                    部门类型：
                </td>
                <td>
                    <select id="departmentType">
                        <option value="00" @(department.DepartmentType == "00" || department.Id == 0 ? "selected" : "")>护理部</option>
                        <option value="01" @(department.DepartmentType == "01" ? "selected" : "")>医务部</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td style="text-align:right; width:100px;">
                    部门名称：
                </td>
                <td>
                    <input type="text" id="txtDepartmentName" class="l-text" style="width:250px;" value="@(department.DepartmentName)" /><font style="color:red;">&nbsp;*</font>
                </td>
            </tr>
            <tr>
                <td style="text-align:right; width:100px;">
                    部门编码：
                </td>
                <td>
                    <input type="text" id="txtDepartmentCode" class="l-text" style="width:250px;" value="@(department.DepartmentCode)" /><font style="color:red;">&nbsp;*</font>
                </td>
            </tr>
            <tr>
                <td style="text-align:right; width:100px;">
                    上级部门：
                </td>
                <td id="tdDepartment">
                    <input type="text" id="parentId" style="width:250px;" value="@(department.ParentId)" />
                </td>
            </tr>
            <tr>
                <td style="text-align:right; width:100px;">
                    部门负责人：
                </td>
                <td>
                    <input type="text" id="txtManager" class="l-text" style="width:250px;" value="@(department.Manager)" />
                </td>
            </tr>
            <tr>
                <td style="text-align:right; width:100px;">
                    电话：
                </td>
                <td>
                    <input type="text" id="txtTelephone" class="l-text" style="width:250px;" value="@(department.Telephone)" />
                </td>
            </tr>
            <tr>
                <td style="text-align:right; width:100px;">
                    排序：
                </td>
                <td>
                    <input type="text" id="txtSort" class="l-text" style="width:250px;" value="@(department.Sort ?? 0)" />
                </td>
            </tr>
            <tr>
                <td style="text-align:right; width:100px;">
                    部门地址：
                </td>
                <td>
                    <input type="text" id="txtLocation" class="l-text" style="width:250px;" value="@(department.Location)" />
                </td>
            </tr>
            <tr>
                <td style="text-align:right; width:100px;">
                    备注：
                </td>
                <td style="padding-top: 5px;">
                    <div style="width:240px;">
                        <textarea id="txtRemarks" rows="3" class="l-textarea" maxlength="500" style="padding:5px;width:100%;">@(department.Remarks)</textarea>
                    </div>
                </td>
            </tr>
            <tr>
                <td style="text-align:right; width:100px;">
                    状态：
                </td>
                <td colspan="3">
                    <label for="rdoStatus1">
                        <input type="radio" id="rdoStatus1" name="status" value="0" @((department.Status == 0 || department.Id == 0) ? "checked" : "") />&nbsp;正常
                    </label>&nbsp;&nbsp;
                    <label for="rdoStatus2">
                        <input type="radio" id="rdoStatus2" name="status" value="1" @(department.Status == 1 ? "checked" : "") />&nbsp;停用
                    </label>&nbsp;&nbsp;
                    <label for="rdoStatus3">
                        <input type="radio" id="rdoStatus3" name="status" value="2" @(department.Status == 2 ? "checked" : "") />&nbsp;其他
                    </label>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align:center;padding-top:10px;">
                    <input id="btnSubmit" type="button" value="确定" class="l-button" onclick="save()" />&nbsp;&nbsp;&nbsp;
                    <input id="btnCancel" type="button" value="取消" class="l-button-cancel" onclick="closeDialog()" />
                </td>
            </tr>
            <tr></tr>
        </table>
        <input type="hidden" id="hdnDeptId" value="@(department.Id)" />
    </div>
</body>
</html>
@{
    <script src="~/Areas/Sysbase/Scripts/EditDepartment.js"></script>
}
